﻿#pragma once

#include "World/BlockData.h"

#include <Frustum.h>

class Player;
class World;
class Chunk;

class WorldBehavior
{
public:
  virtual ~WorldBehavior() = default;

  virtual void OnChunkLoaded(const Ref<Chunk>& chunk, World &world) {};
  virtual void OnBlockPlace(Player *player, glm::ivec3 blockPos, const BlockData *block, World &world) {};
  virtual void OnBlockBreak(Player *player, glm::ivec3 blockPos, const BlockData *block, World &world) {};
  virtual void OnBlockUpdate(glm::ivec3 blockPos, BlockData &block, World &world) {};

  virtual void Update(float deltaTime) {};
  virtual void RenderOpaque(glm::mat4 transform, glm::vec3 playerPos, const Frustum &frustum) {}
};